#include <iostream>
using namespace std;

void continuesSquenceWithSum(int x)
{
	int sum = 3,small = 1 , big =2;
	while(small < (x+1)/2)
	{
		if(sum>x)
		{
			sum-=small;
			++small;
		}
		else if(sum<x)
		{
			++big;
			sum+=big;
		}
		else
		{
			for(int i = small ; i<= big ; ++i)
				cout<<i<<",";
			cout<<endl;
			sum-=small;
			++small;
		}
	}
}

int main()
{
	continuesSquenceWithSum(255);
	continuesSquenceWithSum(4);
	continuesSquenceWithSum(0);
	continuesSquenceWithSum(3);

	return 0;
}